home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS14.ADF / Progs / VC.DOC < prev    next >
Text File  |  1989-01-28  |  7KB  |  200 lines

  1.  
  2. vc - spreadsheet calculator ("visicalc-like")
  3.  
  4. vc [file]
  5.  
  6. DESCRIPTION
  7.  
  8. 'Vc' is a calculator that is based on rectangular tables, in much the
  9. same style as VisiCalc or T/Maker.  When it is invoked it presents you
  10. with an empty table organised as rows and columns of entries.  Each
  11. entry may have a label string associated with it and an expression.
  12. The expression may be a constant or it may compute something based on
  13. other entries.
  14.  
  15. When 'vc' is running, the screen is divided into three regions:  the
  16. top line is for entering commands, the second line is for messages
  17. from 'vc', and the rest form a window looking at the table. 'vc' has
  18. two cursors:  an entry cursor (indicated by a '<' on the screen) and a
  19. character cursor (indicated by the terminal's hardware cursor). The
  20. entry and character cursors are often the same, they will differ when
  21. a long command is being typed in the top line.
  22.  
  23. The following single control character commands are recognized no
  24. matter where the character cursor is.
  25.  
  26. ^N    Move the entry cursor to the next row.
  27.  
  28. ^P    Move the entry cursor to the previous row.
  29.  
  30. ^F    Move the entry cursor forward one column.
  31.  
  32. ^B    Move the entry cursor backward one column.
  33.  
  34. ^C    Exit from 'vc'. If you were editing a named file, and you modified
  35. it, then it will ask about saving before exiting.
  36.  
  37. ^G    Abort the current long command.
  38.  
  39. ^H    Backspace one character.
  40.  
  41. ^L    Propagate values around the screen.  A complicated set of rows and
  42. columns may require more than one ^L to stabilize.
  43.  
  44. ^R    Redraw the screen.
  45.  
  46. ^J    Creates a new row immediately following the current row.  It is
  47. initialized to be a copy of the current row, with all variable
  48. references moved down one row.  If an expression is to be duplicated
  49. with ^J the moving down of a variable reference may be avoided by
  50. using the "fixed" operator.
  51.  
  52. ^V    Types, in the long command line, the name of the entry being
  53. pointed at by the entry cursor.  This is used when typing in
  54. expressions to refer to entries in the table.
  55.  
  56. ^U n    Sets the numeric argument to the following command to 'n'.
  57. Commands like ^F and ^B use the numeric argument as the number of
  58. times to perform the operation.  If you aren't entering a long command
  59. then the ^U is unnecessary:  repetition count arguments may be entered
  60. just as a string of digits.
  61.  
  62.  
  63. The following commands are only valid when the character and entry
  64. cursors are the same.  That is, when no long command is being entered.
  65. Most of them introduce a new long command.
  66.  
  67. =    Prompts for an expression which will be evaluated dynamically to
  68. produce a value for the entry pointed at by the entry cursor.  This
  69. may be used in conjunction with ^V to make one entries value be
  70. dependent on anothers.
  71.  
  72. C    Clears the current entry as if there were none.
  73.  
  74. ?    Types a brief helpful message.
  75.  
  76. "    Enter a label for the current entry.
  77.  
  78. e    Edit the value associated with the current entry.  This is identical
  79. to '=' except that the command line starts out containing the old
  80. value or expression associated with the entry.
  81.  
  82. E    Edit the string associated with the current entry.  This is the same
  83. as either "leftstring", "rightstring", or "label", with the additional
  84. fact that the command line starts out with the old string.
  85.  
  86. <    Associate a string with this entry that will be flushed left against
  87. the left edge of the entry.
  88.  
  89. >    Associates a string with this entry that will be flushed right
  90. against the right edge of the entry.
  91.  
  92. g    Get a new database from a named file.
  93.  
  94. p    Put the current database onto a named file.
  95.  
  96. w    Write a listing of the current database in a form that matches its
  97. appearance on the screen.  This differs from the "put" command in that
  98. "put"s files are intended to be reloaded with "get", while "write"
  99. produces a file for people to look at.
  100.  
  101. T    Write a listing of the current database to a file, but put ":"s
  102. between each field.  This is useful for tables that will be further
  103. formatted by the 'tbl' preprocessor of 'nroff'.
  104.  
  105. f    Sets the output format to be used for printing the numbers in each
  106. entry in the current column.  Type in two numbers which will be the
  107. width in characters of a column and the number of digits which will
  108. follow the decimal point.
  109.  
  110. r    Create a new row by moving the row containing the entry cursor, and
  111. all following, down one.  The new row will be empty.
  112.  
  113. c    Create a new column by moving the column containing the entry
  114. cursor, and all following, right one.  The new column will be empty.
  115.  
  116. d    Delete this row.
  117.  
  118. D    Delete this column.
  119.  
  120. C    Clear this entry.
  121.  
  122.  
  123. Expressions that are used with the '=' and 'e' commands have a fairly
  124. conventional syntax.  Terms may be variable names (from the ^V
  125. command), parenthesised expressions, negated terms, and constants.
  126. The +/ term sums values in rectangular regions of the table (the
  127. notation +/ is reminiscent of apl's additive reduction.) Terms may be
  128. combined using many binary operators.  Their precedences (from highest
  129. to lowest) are:  *,/; +,-; <,=,>,<=,>=; &; |; ?.
  130.  
  131.  
  132. exec("progname",arg1,...,argn)
  133.  
  134. Start a Bourne shell with "progname" and arg1 through argn as
  135. arguments.  The args can be arbitrary vc expressions.  The output of
  136. progname is converted to a floating point number and the result is
  137. returned as the value of exec.
  138.  
  139. e+e    Addition.
  140.  
  141. e-e    Subtraction.
  142.  
  143. e*e    Multiplication.
  144.  
  145. e/e    Division.
  146.  
  147. +/v:v    Sum all valid (nonblank) entries in the region whose two corners
  148. are defined by the two variable (entry) names given.
  149.  
  150. e?e:e    Conditional:  If the first expression is true then the value of
  151. the second is returned, otherwise the value of the third is.
  152.  
  153. <,=,>,<=,>=    Relationals: true iff the indicated relation holds.
  154.  
  155. &,|    Boolean connectives.
  156.  
  157. To make a variable not change automatically when a row is duplicated
  158. with ^J, put the word 'fixed' in front of it.  I.e.
  159.  
  160. r2c1*fixed r3c1 
  161.  
  162.  
  163. Amiga Modifications
  164.  
  165. I have added a few changes, and plan others, to 'vc' to make it more
  166. useable on the Amiga.
  167.  
  168. The four cursor movement keys can be used to move the cursor around
  169. instead of using ^P,^N,^F, and ^B.
  170.  
  171. The cursor character '<' is also displayed in colour.
  172.  
  173.  
  174. Authors
  175.  
  176. James Gosling wrote the original version.  It was later modified by
  177. Mark Weiser and Bruce Israel.  Peter Hardie then ported it to the
  178. Amiga and is currently working on adding some more enhancements so
  179. that the program will make effective use of the mouse and menus.
  180.  
  181.  
  182. FILES
  183. expense.sc - a sample expense report.
  184. apartments.sc - another example file.
  185.  
  186. SEE ALSO
  187.  
  188. The Unix commands bc(1) and dc(1). The VisiCalc or T/Maker manuals.
  189.  
  190. BUGS
  191.  
  192. There should be a */ operator.
  193.  
  194. Expression reevaluation is done in the same top-to-bottom,
  195. left-to-right manner as is done in other spreadsheet calculators.
  196. This is silly.  A proper following of the dependency graph with
  197. (perhaps) recourse to relaxation should be implemented.
  198.  
  199. At most 100 rows and 40 columns.
  200.